cmake_minimum_required(VERSION 3.8)
project(test_action)

# Default to C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(test_interfaces REQUIRED)
find_package(OpenCV 4.4.0 QUIET)
find_package(Eigen3 REQUIRED)

include_directories(
  include
)

add_executable(client 
  src/client.cpp
)
ament_target_dependencies(client rclcpp rclcpp_action std_msgs test_interfaces)

add_executable(server 
  src/server.cpp
)
ament_target_dependencies(server rclcpp rclcpp_action std_msgs test_interfaces)

install(
  TARGETS client server
  DESTINATION lib/${PROJECT_NAME}/
)

ament_package()
